/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.domain;


import com.msk.common.utils.NumberFormatUtil;
import com.msk.common.utils.NumberFormatUtils;
import com.msk.common.utils.StringUtils;
import com.msk.sys.domain.DataEntity;
import java.math.BigDecimal;

/**
 * <p>
 * []
 * </p>
 * <p>
 * 作者：wlxiang
 * </p>
 * <p>
 * 邮箱：weilx@msktech.com.cn
 * </p>
 * <p>
 * 创建时间： 2020-02-22
 * </p>
 * <p>
 * 类说明：导出应付明细汇总表合同Entity
 * </p>
 * <p>
 * 修改记录：
 * </p>
 */
public class LogisticsOrderDetailedSummary extends DataEntity<LogisticsOrderDetailedSummary> {

	private static final long serialVersionUID = 1L;

	private String supplierName;

	private String originalNumber;

	private String goodsCode;

	private String goodsName;

	private String revicePrice;

	private String paid;

	private String invoiceTotal;

	private String uninvoiceTotal;

	private String applyPaid;

	private String unapplyPaid;

	private String unifiedSocialCode;

	private String baseAccountName;

	private String baseAccountNo;

	private String baseAccountBankAddr;

	/**
	 * 部分导出使用
	 */
	private String[] idArray;

	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	public String getOriginalNumber() {
		return originalNumber;
	}

	public void setOriginalNumber(String originalNumber) {
		this.originalNumber = originalNumber;
	}

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public String getRevicePrice() {
		if(StringUtils.isNotBlank(revicePrice) && NumberFormatUtils.isNumeric(revicePrice) ){
			BigDecimal revicePriceInt = new BigDecimal(revicePrice);
			return NumberFormatUtil.numberFormat(revicePriceInt.doubleValue(),2) + "";
		}
		return revicePrice;
	}

	public void setRevicePrice(String revicePrice) {
		this.revicePrice = revicePrice;
	}

	public String getPaid() {
		if(StringUtils.isNotBlank(paid) && NumberFormatUtils.isNumeric(paid) ){
			BigDecimal paidInt = new BigDecimal(paid);
			return NumberFormatUtil.numberFormat(paidInt.doubleValue(),2) + "";
		}
		return paid;
	}

	public void setPaid(String paid) {
		this.paid = paid;
	}

	public String getInvoiceTotal() {
		if(StringUtils.isNotBlank(invoiceTotal) && NumberFormatUtils.isNumeric(invoiceTotal) ){
			BigDecimal invoiceTotalInt = new BigDecimal(invoiceTotal);
			return NumberFormatUtil.numberFormat(invoiceTotalInt.doubleValue(),2) + "";
		}
		return invoiceTotal;
	}

	public void setInvoiceTotal(String invoiceTotal) {
		this.invoiceTotal = invoiceTotal;
	}

	public String getUninvoiceTotal() {
		if(StringUtils.isNotBlank(invoiceTotal)&& StringUtils.isNotBlank(paid)){
			if(NumberFormatUtils.isNumeric(invoiceTotal)&& NumberFormatUtils.isNumeric(paid)){
				Double gasolineBalanceD = Double.parseDouble(invoiceTotal);
				Double allFreightD = Double.parseDouble(paid);
				if(gasolineBalanceD >= allFreightD ){
					return "0.00";
				}else{
					return NumberFormatUtil.numberFormat((allFreightD- gasolineBalanceD) ,2)+ "";
				}
			}else{
				return revicePrice;
			}
		}else{
			return revicePrice;
		}
	}

	public void setUninvoiceTotal(String uninvoiceTotal) {
		this.uninvoiceTotal = uninvoiceTotal;
	}

	public String getApplyPaid() {
		if(StringUtils.isNotBlank(applyPaid) && NumberFormatUtils.isNumeric(applyPaid) ){
			BigDecimal applyPaidInt = new BigDecimal(applyPaid);
			return NumberFormatUtil.numberFormat(applyPaidInt.doubleValue(),2) + "";
		}
		return applyPaid;
	}

	public void setApplyPaid(String applyPaid) {
		this.applyPaid = applyPaid;
	}

	public String getUnapplyPaid() {
		if(StringUtils.isNotBlank(applyPaid)&& StringUtils.isNotBlank(paid)){
			if(NumberFormatUtils.isNumeric(applyPaid)&& NumberFormatUtils.isNumeric(paid)){
				Double gasolineBalanceD = Double.parseDouble(applyPaid);
				Double allFreightD = Double.parseDouble(paid);
				if(gasolineBalanceD >= allFreightD ){
					return "0.00";
				}else{
					return  NumberFormatUtil.numberFormat((allFreightD- gasolineBalanceD),2) + "";
				}
			}else{
				return paid;
			}
		}else{
			return paid;
		}
	}

	public void setUnapplyPaid(String unapplyPaid) {
		this.unapplyPaid = unapplyPaid;
	}

	public String getUnifiedSocialCode() {
		return unifiedSocialCode;
	}

	public void setUnifiedSocialCode(String unifiedSocialCode) {
		this.unifiedSocialCode = unifiedSocialCode;
	}

	public String getBaseAccountName() {
		return baseAccountName;
	}

	public void setBaseAccountName(String baseAccountName) {
		this.baseAccountName = baseAccountName;
	}

	public String getBaseAccountNo() {
		return baseAccountNo;
	}

	public void setBaseAccountNo(String baseAccountNo) {
		this.baseAccountNo = baseAccountNo;
	}

	public String getBaseAccountBankAddr() {
		return baseAccountBankAddr;
	}

	public void setBaseAccountBankAddr(String baseAccountBankAddr) {
		this.baseAccountBankAddr = baseAccountBankAddr;
	}

	public String[] getIdArray() {
		return idArray;
	}

	public void setIdArray(String[] idArray) {
		this.idArray = idArray;
	}
}